

package com.scs.application.modules.upms.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.model.TreeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 机构实体对象
*/
@TableName("office")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
public class Office extends TreeEntity  implements Serializable {

    /** 识别码 */
    @Length(max=50, message="识别码长度必须介于 0 和 50 之间")
    private String code;

    /** 名称 */
    @NotBlank(message="名称不能为空")
    @Length(min=1, max=50, message="名称长度必须介于 1 和 50 之间")
    private String name;

    /** 排序 */
    @NotNull(message="排序不能为空")
    private Long sort;

    private String type;

    @TableField(exist = false)
    private String parentName;


    public static final String TYPE_SUPPLIER = "SUPPLIER";
    public static final String TYPE_HOSPITAL = "HOSPITAL";
    public static final String TYPE_PLATFORM = "PLATFORM";

}
